
import { createApp } from 'vue'
import { createPinia } from 'pinia'

import App from './App.vue'
import router from './router/index.js'
//引入element
import ElementPlus from 'element-plus'
//element中文
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import 'element-plus/dist/index.css'

//引入公共css
import '@/assets/reset.css'
import '@/assets/common.less'
//引入图标
import '@/assets/icon/iconfont.css'

const app = createApp(App)

app.use(createPinia())
app.use(router)
app.use(ElementPlus, {
    locale: zhCn
})

//权限命令
import { myDirective } from '@/utils/directive.js'
app.directive('pe', myDirective)
//引入element icon
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

for (const [key, component] of Object.entries(ElementPlusIconsVue)){
    app.component(key, component)
}
app.mount('#app')
